package org.hepeng.workx.jdbc;

import org.hepeng.workx.extension.XPoint;

import javax.sql.DataSource;
import java.util.List;

/**
 * @author he peng
 */

@XPoint("randomReadAndWrite")
public interface SelectDataSourceStrategy {

    DataSource chooseDataSource(Object key);

    List<DataSourceInfo> getAllDataSources();

    List<DataSource> getReadOnlyDataSources();

    List<DataSource> getWriteOnlyDataSources();

    List<DataSource> getReadAndWriteDataSources();

    void registerDataSource(DataSourceInfo dataSourceInfo);

    void registerDataSource(List<DataSourceInfo> dataSourceInfos);

}
